package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SalesDetailMapper;
import com.ruoyi.system.domain.SalesDetail;
import com.ruoyi.system.service.ISalesDetailService;

/**
 * 销售订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-20
 */
@Service
public class SalesDetailServiceImpl implements ISalesDetailService 
{
    @Autowired
    private SalesDetailMapper salesDetailMapper;

    /**
     * 查询销售订单明细
     * 
     * @param id 销售订单明细主键
     * @return 销售订单明细
     */
    @Override
    public SalesDetail selectSalesDetailById(Long id)
    {
        return salesDetailMapper.selectSalesDetailById(id);
    }

    /**
     * 查询销售订单明细列表
     * 
     * @param salesDetail 销售订单明细
     * @return 销售订单明细
     */
    @Override
    public List<SalesDetail> selectSalesDetailList(SalesDetail salesDetail)
    {
        return salesDetailMapper.selectSalesDetailList(salesDetail);
    }

    /**
     * 新增销售订单明细
     * 
     * @param salesDetail 销售订单明细
     * @return 结果
     */
    @Override
    public int insertSalesDetail(SalesDetail salesDetail)
    {
        return salesDetailMapper.insertSalesDetail(salesDetail);
    }

    /**
     * 修改销售订单明细
     * 
     * @param salesDetail 销售订单明细
     * @return 结果
     */
    @Override
    public int updateSalesDetail(SalesDetail salesDetail)
    {
        return salesDetailMapper.updateSalesDetail(salesDetail);
    }

    /**
     * 批量删除销售订单明细
     * 
     * @param ids 需要删除的销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteSalesDetailByIds(Long[] ids)
    {
        return salesDetailMapper.deleteSalesDetailByIds(ids);
    }

    /**
     * 删除销售订单明细信息
     * 
     * @param id 销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteSalesDetailById(Long id)
    {
        return salesDetailMapper.deleteSalesDetailById(id);
    }
}
